package com.jblog.core.dao.base;

import java.io.Serializable;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.jblog.core.model.BaseParam;

public interface EntityDao<E,PK extends Serializable>{
	
//    public E get(PK pk) throws DataAccessException;
//
//    public E get(String s) throws DataAccessException;
//
//	public List<E> byEntity(E e) throws DataAccessException;
    
    public E get() throws DataAccessException;

    public Long count(BaseParam p) throws DataAccessException;

	public List<E> byParam(BaseParam p) throws DataAccessException;

	public void save(E e) throws DataAccessException;
	
	public void saveBatch(List<E> es) throws DataAccessException;
	
	public void update(E e) throws DataAccessException;
	
//	public void enDisable(E e) throws DataAccessException;
	
	public void deleteByPk(PK pk) throws DataAccessException;

	public void deleteBatchByPks(List<PK> pks) throws DataAccessException;
//
//	public void deleteByEntity(E e) throws DataAccessException;
	
//	public void deleteBatchByEntity(List<E> es) throws DataAccessException;
	
}
